package cn.cool.netty.nio.buffer;

import java.nio.ByteBuffer;

public class TestByteBufferReadWrite {
    public static void main(String[] args) {
        ByteBuffer buffer = ByteBuffer.allocate(10);
        buffer.put((byte) 0x61);
        buffer.put(new byte[]{0x62, 0x63, 0x64, 0x65});
        buffer.flip();
        buffer.get();
        buffer.compact();
        System.out.println("stop");
    }
}
